projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a03176
)
ostree: avoid a segfault
author
Matthias Clasen
<mclasen@redhat.com>
Sun, 6 May 2012 00:59:23 +0000
(20:59 -0400)
committer
Colin Walters
<walters@verbum.org>
Sun, 6 May 2012 17:56:57 +0000
(13:56 -0400)
When running ostree --repo=/ostree/repo without further arguments,
we end up calling strcmp with one argument being NULL.
src/ostree/ot-main.c
patch
|
blob
|
history
diff --git
a/src/ostree/ot-main.c
b/src/ostree/ot-main.c
index f328faf27e951075c9380c21c80ec7259af48736..3bdc4b3da6f49a2b9079850b2e129d07646f9b5b 100644
(file)
--- a/
src/ostree/ot-main.c
+++ b/
src/ostree/ot-main.c
@@
-140,7
+140,7
@@
ostree_main (int argc,
builtin = builtins;
while (builtin->name)
{
- if (
strcmp
(cmd, builtin->name) == 0)
+ if (
g_strcmp0
(cmd, builtin->name) == 0)
break;
builtin++;
}